Update zh-cn.ts to 049b5bf - #2419
Conversation
Issue reported and fixed by @playermiller109 ([PR zsviczian#2418](zsviczian#2418), [PR #2](#2)). - [x] Removed unnecessary trailing whitespace characters at the end of lines. - [x] Replaced multiple consecutive spaces within sentences with a single space. - [x] Unified JSON key-value formatting to follow key: value, ensuring all keys are followed by a colon and a single space (replacing inconsistent key : value formats). - [x] Removed excessive blank lines.
There was a problem hiding this comment.
1 这类脚本更适合作为个人本地使用的小工具。
2 若确实想尝试提交,你可能最好把下面代码中的中文注释也改为英文。
3 此外,应当取消在 function readLocaleFiles() 和 function diffLang() 设置默认变量值为 zh-cn.ts,因在第 128 行已有默认自定义语言的入口。你可以在第 128 行这里添加一行注释,说明可以将此处改为其他语言的文件名。
1 This type of script is more suitable as a small tool for personal local use.
2 If you really want to try submitting it, you'd better change the Chinese comments in the following code to English as well.
3 In addition, you should remove the default variable values set to zh-cn.ts in function readLocaleFiles() and function diffLang(), because there is already an entry for the default custom language on line 128. You can add a comment on line 128 to indicate that this can be changed to the file name of other languages.
There was a problem hiding this comment.
我还是不太推荐提交。别的不说,像正则表达式这种实际使用中经常需要调试修改的,如果每次调整都要等待作者审核,反而可能影响到你的工作效率。代码文件毕竟比不得翻译文本,确实存在一定的风险隐患,可能会添不少不必要的麻烦。
I still don't quite recommend submitting it. Not to mention, things like regular expressions often need to be debugged and modified in actual use. If you have to wait for the review every time you make an adjustment, it may actually affect your work efficiency. After all, code files are different from translated texts. There are indeed certain potential risks, which may cause quite a lot of unnecessary troubles.
There was a problem hiding this comment.
写这个脚本我只是为了方便自己在行号无法对应的时候快速找到差异。提交上来是觉得有人可能会用得上,另外的原因是我保存在本地可能会丢失。我知道写的并不严谨,但是能用而且够用,并且在当前可能也只有我自己去使用这个脚本。我想不出有什么情况需要经常去调整里面的正则表达式,而且如果有需要,我肯定是在本地修改使用之后才提交修改,不会影响到我的工作效率
I wrote this script simply for my own convenience to quickly identify differences when line numbers don't match. I'm sharing it because I thought it might be useful to someone else, and also because keeping it locally could risk losing it. I know it's not written with strict rigor, but it's functional and sufficient, especially since, for now, I'm likely the only one using this script. I can't think of any situations where the regular expressions in it would need frequent adjustments, and if necessary, I would definitely modify and test it locally before submitting any changes, so it won't affect my work efficiency.
There was a problem hiding this comment.
一旦提交,这就不只是你一个人的事了,作者需要审核你这个脚本。而且既然想要提交,说为了自己使用方便,难免不太合适。如果你确实希望其他人也能用上,就不能还用中文注释,更不能写不严谨的内容。
至于说保存在本地可能会丢失,我看到你有不少历史仓库,你应该是知道怎么用 GitHub 仓库进行保存的呀。
Once submitted, this won't just be your own matter. The author needs to review your script. Moreover, since you want to submit it, it's inappropriate to use it simply for your own convenience. If you really hope that others can also use it, you can't keep using Chinese comments, and you definitely can't write content that is not rigorous.
As for the concern that it might be lost if saved locally, I noticed that you have quite a few historical repositories. You should know how to use a GitHub repository for storage?
There was a problem hiding this comment.
当然,每个人都有自己的选择。我没问题了。
Of course, everyone has their own choices. I have no more questions.
| LINKS_VTW: "参加研讨会", | ||
| LINKS_BOOK_ARIA: "阅读我的视觉思维著作《Sketch Your Mind》", | ||
| LINKS_BOOK: "阅读书籍", | ||
| LINKS_WIKI: "插件 Wiki" , |
There was a problem hiding this comment.
翻译为“插件维基”如何?因为翻译文件里还有 Obsidian 的 Wiki 链接这样的词,可以适当区分,不然以后批处理的时候比较麻烦。这个“维基”就是维基百科的那个维基。
How about translating it as "插件维基"? Since there are also terms like Obsidian "Wiki" link, it's better to make an appropriate distinction; otherwise it will be quite troublesome during batch processing in the future. This "维基" is the same as the one in Wikipedia.
There was a problem hiding this comment.
我认为 Wiki 这样的词汇不行需要翻译,就像 Android 没必要坚持写成 “安卓”一样。我觉得这样的名词直接使用英文更加直观,不容易被误读
I believe that terms like "Wiki" do not need to be translated, just as "Android" doesn't necessarily have to be written as "安卓." I think using such nouns directly in English is more straightforward and less prone to misinterpretation.
There was a problem hiding this comment.
虽然这不能回答关于在两个术语之间进行区分的部分,但是也行吧。
This doesn't address the part about distinguishing between the two terms, but OK then.
| "当您处于 Markdown 阅读模式(即查看绘图的背景笔记)时,Excalidraw 绘图是否应该渲染为图像?" + | ||
| "此设置不会影响您在 Excalidraw 模式下的绘图显示,或者在将绘图嵌入 Markdown 文档时,或在渲染悬停预览时。<br><ul>" + | ||
| "<li>请参阅下面‘嵌入和导出’部分的 <a href='#"+TAG_PDFEXPORT+"'>PDF 导出</a> 相关设置。</li></ul><br>" + | ||
| "<li>请参阅下面‘嵌入和导出’部分的 <a href='#" +TAG_PDFEXPORT+ "'>PDF 导出</a> 相关设置。</li></ul><br>" + |
There was a problem hiding this comment.
这里以及其他相同格式的部分,想知道为什么要给这类写在句中的加号加空格呢,是批处理不小心覆盖到了吗?我处理的时候特意只处理了末尾的加号,句中都是留着的。
In this part and elsewhere in the same format like TAG_AUTOEXPORT, may I ask why did you add spaces around + signs in sentences? Was it accidentally changed during the batch processing? When I was handling it, I specifically only dealt with the + signs at the end.
There was a problem hiding this comment.
个人习惯
Personal habits
| "您可为某个 MD-Embed 单独设置此项,方法是在其源文件的 frontmatter 中添加形如 <code>excalidraw-border-color: gray</code> 的键值对。<br>" + | ||
| "如果您不想要边框,请留空。", | ||
| MD_CSS_NAME: "MD-Embed 的默认 CSS 样式表", | ||
| MD_CSS_NAME: " CSS 样式表文件", |
There was a problem hiding this comment.
多加了一个空格?should be "CSS 样式表文件"?
There was a problem hiding this comment.
我在删除前面内容的时候没有注意到这个空格。
I didn't notice this space when deleting the previous content.
| SCRIPT_UPDATES_AVAILABLE: `脚本更新可用 - 请检查脚本存储。\n\n ${ DEVICE . isDesktop ? `此消息可在控制台日志中查看 ( ${ DEVICE . isMacOS ? "CMD+OPT+i" : "CTRL+SHIFT+i" } )\n\n` : "" } 如果您已将脚本组织到脚本存储文件夹下的子文件夹中,并且存在同一脚本的多个副本,可能需要清理未使用的版本以消除此警报。对于不需要更新的私人脚本副本,请将它们存储在脚本存储文件夹之外。` , | ||
| ERROR_PNG_TOO_LARGE: "导出 PNG 时出错 - PNG 文件过大,请尝试较小的分辨率", | ||
|
|
||
| // ModifierkeyHelper.ts |
There was a problem hiding this comment.
这里漏了,en.ts 是小写的 m // modifierkeyHelper.ts。这也不是作者忘记大写了,我确认过是这个文件名。这个可能用的是小驼峰命名。
In en.ts, it's a lowercase "m". I've confirmed that this is the file name. It might be the lower camel case naming.
There was a problem hiding this comment.
我检查了所有被翻译成中文的注释,而英文注释没有做检查。
I reviewed all the comments translated into Chinese, but I did not check the English comments.
|
我只是利用业余时间,凭着自己的兴趣,尽量跟进更新,没有办法每一次都做到十分完美,抱歉 I’m just using my spare time and personal interest to keep up with updates as much as possible. I can’t make everything perfect every time, sorry. |
还是再解释一下。你可能对这些回复的性质有误解,这是帮你审核代码,并不是说你做错了什么。大家通常都会欢迎这样的帮助,毕竟有人帮忙发现问题,省得自己重复检查。 如果你觉得建议有帮助,就采纳,不认同,就不改。没人说你做得不好或要求你做到完美。 总之,我这边审核完毕,没有疑问了。
I feel like I need to clarify this a bit. It seems like there’s been a misunderstanding about the nature of this feedback. It’s a code review, not a criticism of your work. People usually like this kind of support. Having someone help identify problems, you don’t have to double-check everything yourself. If you find the suggestions helpful, feel free to take them on. If you don’t agree, then don’t. This isn’t about saying your work isn’t good or expecting perfection. Anyway, I’ve completed my review. No more questions. |
|
最后提一点个人建议。既然存在差异,希望你不要在 Correction and unification of format details 这个提交里写 这不是抠字眼,而是在代码协作中,差异追踪很重要。必须明确,否则后续处理困难。 你可以写 Lastly, I'd like to offer a personal suggestion. Since there are differences, I hope you won't write This isn't about nitpicking. In code collaboration, difference tracking is very important. It must be clearly addressed. Otherwise, subsequent handling may be difficult. You can write |
我的英文不好,这就是用 AI 翻译出来的,造成误会,深表歉意。我本意只是希望说明并不是我自己发现的问题,而是根据你提出的问题做了一些修改。 现在我也不知道应该如何去修改这些已提交的说明。以前曾经尝试过类似的操作,但最后被我搞得一塌糊涂。 Use AI translation: My English is not good, so I used AI translation, which might have caused misunderstandings. I sincerely apologize for this. My intention was simply to clarify that the issue was not something I discovered myself but was based on the problem you raised, and I made some adjustments accordingly. Now, I’m unsure how to revise the explanations that have already been submitted. I’ve tried similar operations in the past, but I ended up making a complete mess of things. |
|
I see there are a few minor translation changes. Are you now in agreement regarding the changes in this PR? Can I merge? @rlan, have you looked at the proposed changes to |
|
(I write in English much faster, so I use machine translation for Chinese.) I've read the discussions here. For speakers in Taiwan, they are generally able to understand short words in English, e.g, Wiki is 維基百科 or Google is 谷歌. When it is as long as in Android, they probably prefer 安卓. This is not a strict rule, just mainly what is common knowledge. And common knowledge also change over time. Thank you (@dmscode), for making the equivalent changes for Traditional Chinese. May I ask how new strings were written or generate for Traditional Chinese? For example, the strings in the ContentSearcher.ts section are new. I mentioned OpenCC in #2413 . 我已阅读这里的讨论。 对于台湾的使用者来说,他们通常能理解简短的英文词汇,例如 Wiki 就是“维基百科”,Google 就是“谷歌”。但当词变得像 Android 那么长时,他们可能更倾向于使用“安卓”。这并不是严格的规则,只是目前的常识。而“常识”也会随着时间而改变。 感谢您(@dmscode)对繁体中文所做的相应修改。 我想请教一下,这些繁体中文的新字符串是如何编写或生成的?例如 ContentSearcher.ts 这一部分中的字符串是新的。 我在 #2413 中提到了 OpenCC。 |
|
On point 1, may I suggest this? How about using the Wikipedia to see if a word is used in English or translated? Wikipedia is widely accepted for Taiwan speakers. Here is the page for Android: https://zh.wikipedia.org/zh-tw/Android 关于第 1 点,我能否提出一个建议?我们是否可以参考维基百科来判断某个词在是使用英文原文还是采用翻译?维基百科在台湾的使用者中具有广泛的认可度。 这是“Android”的维基百科页面链接: |
|
@zsviczian |
|
需要参考 @playermiller109 的意见,因为格式修改部分是他提出来的,但是我按照自己的喜好进行了实际操作。 中文是我的母语,这包含简体中文和繁体中文。以前只做简体中文的原因是:目前普遍来说,使用繁体中文的人在阅读简体中文上并不存在障碍,而同一个词汇在使用繁体中文的不同地区可能有不同的翻译方法,不太好进行统一和选择。 但既然 @rlan 创建了繁体中文翻译,后续我会尽可能同步跟进更新。
我是完全手动操作,用 AI 对 en.ts 中新增或者修改的部分进行翻译,然后人工校对并润色,再写入对应文件。
我更倾向于另外一种操作思路:如果这个单词是极其常见的,几乎所有普通用户都认识并能正确理解的,而翻译以后的词汇使用普遍性并没有超越英文本身,比如 wiki,使用英文也是不错的,甚至在中文中偶尔加入一个这样的单词,阅读效率还有所增加。就像我们快速扫读这一段内容,那么最容易注意到的就是这里唯一的一个单词。 但终究这些没有一个绝对标准的答案,如果翻译的结果不至于被人错误理解,应该也就可以接受吧,至于一些细节,要求上可以稍微宽泛一些。 最后很多时候就是看到更新,便花几分钟的时间跟进一下,所以并不会多么严谨。毕竟我最初的想法也是:
The following content is translated using AI. It is necessary to consult @playermiller109's opinion, as the formatting changes were proposed by him. However, I implemented them based on my personal preferences. Chinese is my native language, which includes both Simplified and Traditional Chinese. Previously, I only worked on Simplified Chinese because, generally speaking, users of Traditional Chinese do not face significant obstacles when reading Simplified Chinese. Moreover, the same term might have different translations across various regions using Traditional Chinese, making it challenging to unify and select the most appropriate version. Since @rlan has created the Traditional Chinese translation, I will strive to keep updates synchronized going forward.
I handle everything manually. Using AI, I translate the newly added or modified parts in the
I prefer a different approach: if a word is extremely common and widely understood by general users, and if the translated version does not surpass the original English term in universality, then using English is perfectly acceptable. In fact, occasionally incorporating such English terms within Chinese text can even enhance reading efficiency. For example, when quickly skimming through this paragraph, the single English word stands out the most. Nonetheless, there is no absolute standard for this. If the translation does not lead to misunderstanding, it should generally be acceptable. As for finer details, the requirements can be somewhat relaxed. In most cases, I simply spend a few minutes keeping up with updates as they appear, without being overly meticulous. After all, my initial thought also was:
|
|
I'd say it is not a must, but if you (@dmscode) do indeed run OpenCC, it would be very helpful. 我认为这不是必须的,但如果你(@dmscode)确实有运行 OpenCC,那会非常有帮助。 |
|
We don't have to use OpenCC but continue to use AI translation. The goal is localization of language, rather than just substituting simplified Chinese characters with traditional Chinese characters. Here is an example from this PR. English: Simplified: Traditional: The localized version should be (OpenCC, ChatGPT): LINKS_TWITTER: "追蹤我", Here is how I prompted ChatGPT to produce both localized Simplified and Traditional Chinese. https://chatgpt.com/share/688833da-4afc-8011-b627-838d0641cde6 Similarly, the same standard shall apply if we localize English from American to British. Example, restroom to toilet and car trunk to car boot. 我们不一定非要使用 OpenCC,继续使用 AI 翻译也是可以的。重点在于语言的在地化(localization),而不仅仅是把简体字替换为繁体字。以下是这个 PR 中的一个例子: ⸻ 英文原文: 简体中文: 繁体中文(字面转换): 台湾用语本地化(OpenCC, ChatGPT): ⸻ 我是这样引导 ChatGPT 同时生成本地化的简体和繁体中文的: 同样的标准也应适用于从美式英语本地化为英式英语的情况。例如: |
|
To be fair, your AI translation does localize some terms to Taiwan Traditional Chinese. But it misses some. For example, in Did you use AI to translate from Simplified to Traditional Chinese? Because there is probably more data between English-Traditional Chinese than Simplified-Traditional Chinese, AI is probably better if one uses English as the source material. 公平地说,你们的 AI 翻译确实将部分术语本地化为台湾繁体中文,但也漏掉了一些。例如,在 MD_CSS_DESC 中,“frontmatter” 一词在 "zh-cn" 中保留为英文,而在 "zh-tw" 中则被翻译成中文。 你们是否是用 AI 从简体中文翻译成繁体中文?因为从英文翻译成繁体中文的训练数据可能比简体转繁体的更多,因此如果以英文为源语言,AI 的翻译效果可能会更好。 |
@zsviczian Could the commit message be modified during the merge? After all, the description here still doesn't quite match the actual situation. According to what @dmscode said, this task seems outside zir current area of expertise. I don't have many requirements for translation. As for the script, I mainly considered that it might make the author's review cumbersome. As long as it doesn't cause trouble, I'm open to the content. Please merge. 请问在合并过程中能否修改这次提交信息?毕竟这里的描述还是和实际情况不太相符。按 @dmscode 所说,他好像确实没有处理这个问题的能力。 我对翻译没有很多要求。脚本的话我也主要考虑的是作者审核比较费事。只要不造成麻烦,我对内容保持开放。请合并。 |
|
@rlan 我只是英文不好,所以需要一些翻译工具来帮助我理解英文的具体含义,避免理解错误。
这里应该是我的疏忽,我希望中文繁体和简体的翻译风格上尽可能保持一致,这样后续维护起来也会更加简单。
使用繁体中文的地区挺多的。风格又不统一。我觉得严格要求必须按照某个特定地区的风格进行翻译似乎并不合理。所以在用词上,我不希望过度严格,马马虎虎吧。只是尽量对于同一个内容使用相同的翻译就好。 我觉得真正的问题是现在语言文件的内容太多,而且是长时间积累演变出来的,现在应该进行一次完整的内容校对和风格统一。无论是中文还是英文都是如此。但这件事情的工作量非常大,我想逃避。我尝试修改了几条,但改到后面发现前人的翻译非常精妙,有一些我并没有意识到的好处,所以后来又改回去了。 而且既然目前的语言文件能用,能被人理解,我也觉得没必要让 @zsviczian 在这个问题上耗费更多的精力。 当然这就意味着总会存在许多细节上的小问题。也许未来的某一天忽然心情大好,会去一口气把这些问题解决掉。 我还是关闭这一次 pr 吧,整理并完善一下,重新提交 The following content is translated using AI. I’m just not very good at English, so I need some translation tools to help me understand the precise meaning of English and avoid misunderstandings.
This was likely my oversight. I hope to maintain consistency in translation styles between Simplified and Traditional Chinese as much as possible, as it will make future maintenance easier.
Traditional Chinese is used in many regions, and the styles are not unified. I think strictly adhering to the style of a specific region for translation doesn’t seem reasonable. Therefore, I don’t want to be overly strict with word choice—just aim for consistency in translating the same content. I believe the real issue is that the language files have grown too large and evolved over time. Now, it’s necessary to conduct a thorough review and unify the styles, both for Chinese and English. However, this task is immense, and I feel like avoiding it. I tried editing a few entries, but as I progressed, I realized the previous translations were quite brilliant, offering benefits I hadn’t initially noticed. So, I reverted some changes. Since the current language files are functional and understandable, I don’t think @zsviczian needs to expend more effort on this issue. Of course, this means there will always be minor issues in the details. Perhaps someday, when I’m in a great mood, I’ll tackle and resolve all these problems at once. For now, I’ll close this PR, reorganize and refine it, then resubmit. |
No description provided.